package com.demo;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ImportResource;


@ServletComponentScan
//排除application 数据源配置
@SpringBootApplication(scanBasePackages={"com"}, exclude = {
        DataSourceAutoConfiguration.class
})
@MapperScan(basePackages = "com.**.mapper")
@ImportResource(locations = { "classpath:druid/druid-bean.xml" })
public class AppMain /*extends SpringBootServletInitializer  */ {


	public static void main(String[] args) {
//		new SpringApplicationBuilder().sources(VehichleMain.class).web(false).run(args);
//		try {
//			new CountDownLatch(1).await();
//		} catch (InterruptedException e) {
//		}
		SpringApplication.run(AppMain.class, args);
		
	
	}
	
//	@Override
//	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
//		return application.sources(VehichleMain.class);
//	}
}
